package com.tmxk.day01.lifeng.demo2;

import org.junit.Test;

public class TestVehicle {

	//@Test  @注释  @Test测试注解
	//@Test相当于 public static void main (String[] args){}
	public void test() {
		//创建机动车类对象
		//new Vehicle():构造方法
		Vehicle v1 = new Vehicle();
		//v1.color = "灰";
		v1.setColor("灰");
		//v1.price = -10000;
		v1.setPrice(-10000);
		v1.showInfo();
		//直接通过有参数构造赋值
		Vehicle v2 = new Vehicle("白","大众","一汽大众",1623498);
		//方法调用
		v2.showInfo();
	}

}
